Repository navigation
refactor: 统一多身份操作者网关契约 - #317
Merged
Merged
Conversation
FlowOperatorGateway 与 IRepositoryHolder 改用 OperatorKey 查询,移除静默丢弃身份的默认重载;脚本解析器与流程树改为一次批量回查完整参与人列表,并同步缓存、示例和集成文档。 Closes #315
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## dev #317 +/- ##
============================================
+ Coverage 76.51% 76.57% +0.05%
Complexity 2197 2197
============================================
Files 288 288
Lines 8867 8878 +11
Branches 1055 1057 +2
============================================
+ Hits 6785 6798 +13
+ Misses 1557 1551 -6
- Partials 525 529 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
FlowOperatorGateway的get(long, String)/findByIds(List<Long>, String)通过默认实现静默退化为默认身份查询,导致下游未实现多身份能力时编译和调用成功,但身份在运行期丢失。IRepositoryHolder与脚本解析器也重复了同类契约。改动
FlowOperatorGateway改为抽象的get(OperatorKey)/findByKeys(List<OperatorKey>);默认身份get(long)/findByIds(List<Long>)仅作为派生便捷方法。IRepositoryHolder同步改为getOperatorByKey(OperatorKey)/findOperatorsByKeys(List<OperatorKey>),移除拆分身份参数的默认重载。GatewayContext、FlowOperatorLocalThreadCache、流程树预载与脚本解析器统一按OperatorKey处理混合身份,保留请求顺序并避免 N+1。兼容性
这是有意的源码不兼容调整。自行实现
FlowOperatorGateway的下游需要迁移到OperatorKey契约;具体迁移见docs/Integration/operator-identity.md3.2。验证
./mvnw -o clean test:全项目 7 个模块构建成功,581 个用例全部通过(framework 549,其余模块 32)。FlowOperatorKeyGatewayTest,覆盖混合身份一次批量回查、顺序保留、缓存隔离、默认身份派生入口及旧重载移除。Closes #315